﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bricks.Site.Models.DBViewModel.Expense
{
    /// <summary>
    /// 中期价款计量支付表（支表一）
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseFirst
    {
        //public string KeyID { get; set; }

        public string ProjectName { get; set; }

        public string ContractNo { get; set; }

        public string LastDate { get; set; }

        public string ExpenseNo { get; set; }

        public string BuildUnit { get; set; }

        public string SupervisionUnit { get; set; }

        public string ProjectManager { get; set; }

        public string FinanceChief { get; set; }

        public string TablePerson { get; set; }

        public string ThisPeriodRealityCountMoneySmall { get; set; }

        public string ThisPeriodRealityCountMoneyBig { get; set; }

        public string ThisPeriodRealityMoneySmall { get; set; }

        public string ThisPeriodRealityMoneyBig { get; set; }
    }

    /// <summary>
    /// 支表一-上（列表）
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseFirstTopList
    {
        //名          称		合计	100章	200章	300章	400章	500章	600章	700章	暂列金	专项暂列金
        public string ID { get; set; }

        public string SectionID { get; set; }

        public string PeriodID { get; set; }

        public string Name { get; set; }

        public decimal? Total { get; set; }

        public decimal? OneOOZ { get; set; }

        public decimal? TwoOOZ { get; set; }

        public decimal? ThreeOOZ { get; set; }

        public decimal? FourOOZ { get; set; }

        public decimal? FiveOOZ { get; set; }

        public decimal? SixOOZ { get; set; }

        public decimal? SevenOOZ { get; set; }

        public decimal? ProvisionalMoney { get; set; }

        public decimal? ProProvisionalMoney { get; set; }
    }

    /// <summary>
    /// 支表一-下（列表）
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseFirstBottomList
    {
        //名          称		合计	100章	200章	300章	400章	500章	600章	700章	暂列金	专项暂列金
        public string ID { get; set; }

        public string SectionID { get; set; }

        public string PeriodID { get; set; }

        public string LeftName { get; set; }

        public string RightName { get; set; }

        public decimal? Total { get; set; }

        public decimal? OneOOZ { get; set; }

        public decimal? TwoOOZ { get; set; }

        public decimal? ThreeOOZ { get; set; }

        public decimal? FourOOZ { get; set; }

        public decimal? FiveOOZ { get; set; }

        public decimal? SixOOZ { get; set; }

        public decimal? SevenOOZ { get; set; }

        public decimal? ProvisionalMoney { get; set; }

        public decimal? ProProvisionalMoney { get; set; }
    }

    /// <summary>
    /// 支表一应扣款项
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseFirstCutPayment
    {
        //名      称	扣回动员预付款	扣回甲供材料款	扣税金(3.33%）	扣保留金	扣民工工资保证金	扣违约金	扣款合计	实际支付金额
        public string ID { get; set; }

        public string SectionID { get; set; }

        public string PeriodID { get; set; }

        public string LeftName { get; set; }

        public string RightName { get; set; }

        public decimal? CutPaymentForPerson { get; set; }

        public decimal? CutPaymentForMaterial { get; set; }

        public decimal? CutPaymentForTaxation { get; set; }

        public decimal? CutPaymentForSave { get; set; }

        public decimal? CutPaymentForSalary { get; set; }

        public decimal? CutPaymentForPenalty { get; set; }

        public decimal? CutPaymentForTotal { get; set; }

        public decimal? CutPaymentForReality { get; set; }
    }

    public class VMExpenseFirstDemoData
    {
        //private string id;

        //public VMExpenseFirstDemoData()
        //{
        //    id = GuidHelper.NewGuid().ToString();
        //}

        public List<VMExpenseFirstTopList> GetVMExpenseFirstTopList(string sectionID, int periodID)
        {
            List<VMExpenseFirstTopList> result = new List<VMExpenseFirstTopList>();
            VMExpenseFirstTopList newEFL = null;
            for (int i = 0; i < 4; i++)
            {
                newEFL = new VMExpenseFirstTopList();
                //newEFL.ID = GuidHelper.NewGuid();
                newEFL.SectionID = sectionID;
                //newEFL.PeriodID = periodID;
                newEFL.Name = "名称" + i;
                //newEFL.Total = i;  //自动计算
                newEFL.OneOOZ = i;
                newEFL.TwoOOZ = i;
                newEFL.ThreeOOZ = i;
                newEFL.FourOOZ = i;
                newEFL.FiveOOZ = i;
                newEFL.SixOOZ = i;
                newEFL.SevenOOZ = i;
                newEFL.ProvisionalMoney = i;
                newEFL.ProProvisionalMoney = i;
                result.Add(newEFL);
            }
            return result;
        }

        public List<VMExpenseFirstBottomList> GetVMExpenseFirstBottomList(string sectionID, int periodID)
        {
            List<VMExpenseFirstBottomList> result = new List<VMExpenseFirstBottomList>();
            VMExpenseFirstBottomList newEFL = null;
            for (int i = 0; i < 9; i++)
            {
                newEFL = new VMExpenseFirstBottomList();
                //newEFL.ID = GuidHelper.NewGuid();
                newEFL.SectionID = sectionID;
                //newEFL.PeriodID = periodID;
                newEFL.LeftName = "名称" + i;
                newEFL.RightName = "名称" + i;
                //newEFL.Total = i;  //自动计算
                newEFL.OneOOZ = i;
                newEFL.TwoOOZ = i;
                newEFL.ThreeOOZ = i;
                newEFL.FourOOZ = i;
                newEFL.FiveOOZ = i;
                newEFL.SixOOZ = i;
                newEFL.SevenOOZ = i;
                newEFL.ProvisionalMoney = i;
                newEFL.ProProvisionalMoney = i;
                result.Add(newEFL);
            }
            return result;
        }

        public List<VMExpenseFirstCutPayment> GetVMExpenseFirstCutPaymentList(string sectionID, int periodID)
        {
            List<VMExpenseFirstCutPayment> result = new List<VMExpenseFirstCutPayment>();
            VMExpenseFirstCutPayment newEFCP = null;
            for (int i = 0; i < 3; i++)
            {
                newEFCP = new VMExpenseFirstCutPayment();
                //newEFCP.ID = GuidHelper.NewGuid();
                newEFCP.SectionID = sectionID;
                //newEFCP.PeriodID = periodID;
                //newEFCP.LeftName = "名称" + i;
                //newEFCP.RightName = "名称" + i;
                //newEFL.Total = i;  //自动计算
                newEFCP.CutPaymentForPerson = i;
                newEFCP.CutPaymentForMaterial = i;
                newEFCP.CutPaymentForTaxation = i;
                newEFCP.CutPaymentForSave = i;
                newEFCP.CutPaymentForSalary = i;
                newEFCP.CutPaymentForPenalty = i;
                //newEFCP.CutPaymentForTotal = i;  //自动计算
                newEFCP.CutPaymentForReality = i;
                result.Add(newEFCP);
            }
            return result;
        }
    }
}
